/*
package com.atguigu.gulimall.order.controller;

import com.atguigu.gulimall.order.entity.OrderReturnApplyEntity;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
public class RabbitmqController {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @GetMapping("/sendMessage")
    public void sendMessage() {
        OrderReturnApplyEntity orderReturnApplyEntity = new OrderReturnApplyEntity();
        orderReturnApplyEntity.setId(1L);
        orderReturnApplyEntity.setReturnName("zhangsan");
        rabbitTemplate.convertAndSend("hello-java-directExchange","hello.java",orderReturnApplyEntity,new CorrelationData(UUID.randomUUID().toString()));
        System.out.println("发送消息成功");
    }
}
*/
